package com.easylinkin.linkappapi.quality.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.easylinkin.linkappapi.common.model.RequestModel;
import com.easylinkin.linkappapi.quality.dto.QualityQuestionInfoDto;
import com.easylinkin.linkappapi.quality.dto.QualityQuestionStatisticsDTO;
import java.util.List;
import java.util.Map;

import com.easylinkin.linkappapi.quality.dto.QuestionClassQueryDTO;
import com.easylinkin.linkappapi.quality.entity.vo.QualityScreenPageVo;
import org.apache.poi.ss.usermodel.Workbook;
import site.morn.rest.RestMessage;

/**
 * @Author: kan yuanfeng
 * @Date: 2022/8/19 14:40
 * @Description:
 */
public interface QualityInspectionAccountService {

  /**
   * @Description: 查询质量台账列表
   * @author kan yuanfeng
   * @date 2020/11/04 11:42
   */
  IPage<QualityQuestionInfoDto> queryListByPage(RequestModel<QualityQuestionInfoDto> requestModel);

  /**
   * @Description: 质量台账详细
   * @author kan yuanfeng
   * @date 2020/11/04 11:42
   */
  QualityQuestionInfoDto findById(Integer id, Integer type);

  Workbook exportById(Integer id, Integer type);

  /**
   * @Description: 查询数量
   * @author kan yuanfeng
   * @date 2020/11/04 11:42
   */
  Map<String, String> getCount(QualityQuestionInfoDto questionInfoDto,String tenantId);

  /**
   * 质量大屏检查趋势
   * @param qualityScreenPageVo 条件vo
   * @return 统一出参
   */
  RestMessage qualityCheckTrend(QualityScreenPageVo qualityScreenPageVo);

  /**
   * 检查分析-根据一级名称分类统计
   * @param qualityScreenPageVo 条件vo
   * @return 统一出参
   */
    RestMessage countByFirstLevelProblemName(QualityScreenPageVo qualityScreenPageVo);

  IPage<QualityQuestionInfoDto> queryOpenApiListByPage(RequestModel<QualityQuestionInfoDto> requestModel);

  JSONObject getOpenApiCount(QualityQuestionInfoDto qualityQuestionInfoDto);

  /**
   * @Description: 质量台账统计
   * @author kan yuanfeng
   * @date 2023/05/26 11:42
   */
  QualityQuestionStatisticsDTO getStatistics(QualityQuestionInfoDto qualityQuestionInfoDto);

  /**
   * @Description: 删除质量台账
   * @author kan yuanfeng
   * @date 2023/05/26 11:42
   */
  void delBatch(List<QualityQuestionInfoDto> list);

  /**
   * 质量检查分析-问题分类统计
   * @param dto
   * @return
   */
  RestMessage queClassStatis(QuestionClassQueryDTO dto);

  /**
   * 质量检查分析-各项目问题出现分析
   * @param dto
   * @return
   */
  RestMessage projectQuestionStatis(QuestionClassQueryDTO dto);
}
